﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PDFRun
{
    internal class MiniDebug
    {
        readonly string _path;

        FileStream _fs;
        StreamWriter _sw;

        public MiniDebug(string type, string other)
        {
            _path = $"{AppDomain.CurrentDomain.BaseDirectory}{type}_{other}.txt";
            _fs = File.Open(_path, FileMode.OpenOrCreate);
            _sw = new StreamWriter(_fs);
        }

        public void Write(string txt)
        {
            _sw.WriteLine(txt);
        }

        public void Close()
        {
            _sw.Close();
            _fs.Close();
        }
    }
}
